package com.zhangshuo.common.dataSource;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
/**
 * Created by Administrator on 2017/5/31 0031.
 */
public class DynamicDataSource extends AbstractRoutingDataSource {
    /**
     * 取得当前使用哪个数据源
     *
     * @return
     */
    @Override
    protected Object determineCurrentLookupKey() {
        return DbContextHolder.getDbType();
    }
}



